﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPageAdmin.master"  AutoEventWireup="true" CodeFile="ManageCategory.aspx.cs" Inherits="admin_ManageCategory" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<form runat=server id="manageproduct">    
		  
     <asp:GridView ID="grdCategory" runat="server" AllowPaging="True" 
        DataKeyNames="Cate_ID" Width="100%" 
        AutoGenerateColumns="False" 
         onpageindexchanging="grdCategory_PageIndexChanging" PageSize="5" 
         onrowcommand="grdCategory_RowCommand" 
         onrowdatabound="grdCategory_RowDataBound" >
        <Columns>
            <asp:TemplateField HeaderText="Tùy chọn">
                <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
					    <ItemTemplate>
						    <asp:CheckBox ID="chkCheck" runat="server" />                               
					    </ItemTemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="ID">
                <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
					    <ItemTemplate>
						    <asp:Label ID="Pro_ID" runat="Server" Text='<%#Eval("Cate_ID") %>' ></asp:Label>
					    </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tên Danh Mục">
                <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
					    <ItemTemplate>
					        <a href='<%# "EditCategory.aspx?Category_ID=" + Eval("Cate_ID") %>'>
						        <asp:Label ID="Product_Pro_Name" runat="Server" Text='<%#Eval("Cate_Name") %>'></asp:Label>
						    </a>
					    </ItemTemplate>
            </asp:TemplateField>
            
            <asp:TemplateField  HeaderText="Hiển thị">
					<ControlStyle Height="16px" Width="16px" />
                    <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" HorizontalAlign="Center" 
                        VerticalAlign="Middle" />
					<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
					<ItemTemplate>
						<asp:ImageButton ID="btnActive" 
						CommandArgument='<%# Eval("Cate_ID") %>' 
						CommandName="active_Category"  ImageUrl="~/admin/images/check.gif" 
						runat="server" /></a>                            
					</ItemTemplate>
				</asp:TemplateField> 
            
            <asp:TemplateField>
                <ControlStyle Height="16px" Width="16px" />
                <HeaderStyle BackColor="#D4D4D4" ForeColor="#888888" HorizontalAlign="Center" 
                    VerticalAlign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
					    <HeaderTemplate>
					    <asp:Label ID="Label3" runat="server" Text="Chức năng" ></asp:Label>                   
					    </HeaderTemplate>
					    <ItemTemplate>                                
						    <asp:HyperLink ID="lnkEdit" runat="server" Font-Bold="true" NavigateUrl='<%# "EditCategory.aspx?Category_ID=" + Eval("Cate_ID") %>'>
							    <asp:Image ID="ImageEdit" ToolTip="Sửa thông tin" runat="server" ImageUrl="~/images/edit.PNG" />
						    </asp:HyperLink>                                
						     <asp:ImageButton ID="btnDelete" CommandArgument='<%# Eval("Cate_ID") %>' CommandName="delete_Category"  ImageUrl="~/images/drop-no.gif" runat="server"  
						    />                                              
    						 
					    </ItemTemplate>
					    <ItemStyle Wrap="False" />
            </asp:TemplateField>
            
        </Columns>
    </asp:GridView>
</form>
</asp:Content>

